package edu.ncst.baseweb.controller.resinfo;

import cn.wintersun.basecommon.common.Result;
import edu.ncst.baseweb.dao.res.ResInfo;
import edu.ncst.baseweb.service.intrer.resinfo.ResInfoService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/booked/booked")
@PreAuthorize("hasAuthority('7')")
//实验室预约
public class ResInfoController {
        @Autowired
        private ResInfoService resInfoService;
        //实验室预约列表，用户预约界面
        @RequestMapping(value = "list",method = RequestMethod.POST)
        public Result<IPage<ResInfo>> list(@RequestBody ResInfo resinfo){

            return  resInfoService.list(resinfo);
        }
        //申请预约按钮
      @RequestMapping(value = "book",method = RequestMethod.POST)
        public Result<Object> boos(@RequestBody ResInfo resInfo){

            return resInfoService.boos(resInfo);
        }


        //詳情

    }

